#!/usr/bin/env python
# vim:fileencoding=utf-8

__license__ = 'GPL v3'
__copyright__ = '2015, lcd1232, malexey1984@gmail.com'
__author__ = 'lcd1232'

from calibre.web.feeds.news import BasicNewsRecipe


class Computerra(BasicNewsRecipe):
    title = u'\u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0440\u0430'
    __author__ = 'lcd1232 (with fixes by bugmen00t)'
    description = 'Компьютерра: все новости про компьютеры, железо, новые технологии, информационные технологии'
    cover_url = 'https://yt3.ggpht.com/ytc/AKedOLRCMA71rKaP4HfL2W26A-VdvsBj9BcOo7S6poTR=s900-c-k-c0x00ffffff-no-rj'
    language = 'ru'
    oldest_article = 100
    max_articles_per_feed = 50
    use_embedded_content = False
    remove_javascript = True
    no_stylesheets = False
    conversion_options = {'linearize_tables': True}
    simultaneous_downloads = 5

    remove_tags_before = dict(name='div', attrs={'id': 'article'})

    remove_tags_after = dict(name='div', attrs={'class': 'article-body'})

    remove_tags = [dict(name='div', attrs={'class': 'cta-row'})]

    feeds = [(
        u'\u041A\u043E\u043C\u043F\u044C\u044E\u0442\u0435\u0440\u0440\u0430',
        'https://www.computerra.ru/feed/'
    )]
